﻿<Window x:Class="TfsBacklogMgr.Main.ChooseIterations"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Choose Iterations" Height="300" Width="300">
    <Window.Resources>
        <DataTemplate x:Key="BacklogItemTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20" />
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <CheckBox x:Name="chk1" IsChecked="{Binding Path=IsBacklogIteration}" Grid.Column="0" VerticalAlignment="Center" />
                <TextBlock Grid.Column="1" Text="{Binding Path=Path}" VerticalAlignment="Center" >
                    <TextBlock.Style>
                        <Style>
                            <Setter Property="TextBlock.FontWeight" Value="Normal" />
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding Path=IsBacklogIteration}" Value="True">
                                    <Setter Property="TextBlock.FontWeight" Value="Bold" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
            </Grid>
        </DataTemplate>
    </Window.Resources>

    <Grid>
        <ListBox x:Name="_BacklogIters" ItemTemplate="{StaticResource BacklogItemTemplate}"
            ItemsSource="{Binding Path=AllIterations}" IsSynchronizedWithCurrentItem="True" Margin="0,0,0,41">
        </ListBox>
        <Button Content="Close" Margin="0,0,12,12" Name="button1" IsDefault="True" HorizontalAlignment="Right" Width="75" Height="23" VerticalAlignment="Bottom" IsCancel="True" />
    </Grid>
</Window>
